drag
Type
command
Summary
Simulates a mouse click and drag.
Syntax
drag [button <number>] from <start> to <end> [with <key> [, <key> [<key>]]]
Description
Use the drag command to paint with the paint tools.
You can use the drag command to move a control, but it is more efficient to use the move command instead.
The dragSpeed property determines how fast the drag motion is.
Parameters
Name | Type | Description |
---|---|---|
number | The number of a mouse button. If you don't specify a number, button 1 is used. | |
start | Any expression that evaluates to a point--a vertical and horizontal distance from the top left of the current stack, separated by a comma. | |
end | Any expression that evaluates to a point. | |
key | One of commandKey, controlKey, optionKey, or shiftKey. You can specify up to three keys, separated by commas. (On Windows and Unix, commandKey indicates the Control key.) |
Examples
drag from "120,89" to "180,2"
drag from the clickLoc to the loc of button "Trash"
drag button 1 from "500,200" to tSavedLoc with shiftKey
Related
property: dragDelta, dontResize, dragSpeed
glossary: command, property, paint tool
keyword: control
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile